Skip to content

Fix photo naming expression returning NULL - #4671

Open
xkello wants to merge 2 commits into
bugfix/fix-reuse-last-entered-valuefrom
bugfix/naming-expression-returning-NULL
Open

Fix photo naming expression returning NULL#4671
xkello wants to merge 2 commits into
bugfix/fix-reuse-last-entered-valuefrom
bugfix/naming-expression-returning-NULL

Conversation

@xkello

@xkello xkello commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Description

When a photo naming expression references a field that's blank, QGIS's || concatenation returns NULL for the whole expression. This NULL wasn't caught before being used as a filename, producing invalid names (a leading space, no real name) that the server rejects on sync with no way to fix it from the app.

Fixes: #4622

What changed

In AttributeController::renamePhotos(), after evaluating and sanitizing the naming expression, an empty/NULL result is now detected before it's turned into a filename. In that case the rename is skipped and the file keeps its original, valid name instead.

@xkello
xkello requested a review from Withalion August 25, 2026 14:47
@github-actions

github-actions Bot commented Aug 25, 2026

Copy link
Copy Markdown

Coverage Report for CI Build 34226277068

Coverage decreased (-0.02%) to 59.049%

Details

  • Coverage decreased (-0.02%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • 6 coverage regressions across 2 files.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

6 previously-covered lines in 2 files lost coverage.

File Lines Losing Coverage Coverage
mm/app/attributes/attributecontroller.cpp 5 73.65%
mm/app/layerfeaturesmodel.cpp 1 81.77%

Coverage Stats

Coverage Status
Relevant Lines: 15770
Covered Lines: 9312
Line Coverage: 59.05%
Coverage Strength: 97.01 hits per line

💛 - Coveralls

@github-actions

Copy link
Copy Markdown

📦 Build Artifacts Ready

OS Status Build Info Workflow run
macOS Build 📬 Mergin Maps 72151 dmg Expires: 23/11/2026 #7215
linux Build 📬 Mergin Maps 72411 x86_64 Expires: 23/11/2026 #7241
win64 Build 📬 Mergin Maps 64171 win64 Expires: 23/11/2026 #6417
Android Build 📬 Mergin Maps 852611 APK [armeabi-v7a] Expires: 23/11/2026 #8526
📬 Mergin Maps 852611 APK [armeabi-v7a] Google Play Store #8526
Android Build 📬 Mergin Maps 852651 APK [arm64-v8a] Expires: 23/11/2026 #8526
📬 Mergin Maps 852651 APK [arm64-v8a] Google Play Store #8526
iOS Build 📬 Build number: 26.08.946711 #9467

Comment thread app/attributes/attributecontroller.cpp Outdated
@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown

📦 Build Artifacts Ready

OS Status Build Info Workflow run
macOS Build 📬 Mergin Maps 72701 dmg Expires: 07/12/2026 #7270
linux Build 📬 Mergin Maps 72961 x86_64 Expires: 07/12/2026 #7296
win64 Build 📬 Mergin Maps 64721 win64 Expires: 07/12/2026 #6472
Android Build 📬 Mergin Maps 858011 APK [armeabi-v7a] Expires: 07/12/2026 #8580
📬 Mergin Maps 858011 APK [armeabi-v7a] Google Play Store #8580
Android Build 📬 Mergin Maps 858051 APK [arm64-v8a] Expires: 07/12/2026 #8580
📬 Mergin Maps 858051 APK [arm64-v8a] Google Play Store #8580
iOS Build Build failed or not found. #9522

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Photo naming expression returns NULL value in some cases

2 participants